package com.echoesnet.echoesshortvideo.Persistence;

import android.arch.persistence.room.ColumnInfo;
import android.arch.persistence.room.Entity;
import android.arch.persistence.room.PrimaryKey;

import java.util.Objects;

/**
 * Copyright (C) 2018 科技发展有限公司
 * 完全享有此软件的著作权，违者必究
 *
 * @author ben
 * @version 1.0
 * @modifier
 * @createDate 2018/4/19 20:30
 * @description
 */
@Entity(tableName = "myVideosInfo")
public class MyVideosInfoEntity
{
    // 自有字段
    @ColumnInfo(name = "userId")
    private String userId;


    //    接口部分
//                 "likeNum":"点赞次数",
//                         "likeOrNot":"0：未点赞1：已赞",
//                         "thumbnails":"缩略图",
//                         "url":"视频地址",
//                         "videoId":"视频id"
    @PrimaryKey()
    @ColumnInfo(name = "videoId")
    private String videoId;
    @ColumnInfo(name = "url")
    private String url;
    @ColumnInfo(name = "thumbnails")
    private String thumbnails;
    @ColumnInfo(name = "likeOrNot")
    private String likeOrNot;
    @ColumnInfo(name = "likeNum")
    private String likeNum;

    public String getVideoId() {
        return videoId;
    }

    public void setVideoId(String videoId) {
        this.videoId = videoId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getLikeOrNot()
    {
        return likeOrNot;
    }

    public void setLikeOrNot(String likeOrNot)
    {
        this.likeOrNot = likeOrNot;
    }

    public String getLikeNum()
    {
        return likeNum;
    }

    public void setLikeNum(String likeNum)
    {
        this.likeNum = likeNum;
    }

    public String getThumbnails() {
        return thumbnails;
    }

    public void setThumbnails(String thumbnails) {
        this.thumbnails = thumbnails;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    @Override
    public boolean equals(Object o)
    {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        MyVideosInfoEntity that = (MyVideosInfoEntity) o;
        return Objects.equals(userId, that.userId) &&
                Objects.equals(videoId, that.videoId) &&
                Objects.equals(url, that.url);
    }


}
